Michael Albinus [Tue, 13 Jul 2021 17:50:05 +0000 (19:50 +0200)]
Add remote-file-name-inhibit-locks
* doc/emacs/files.texi (Interlocking):
* doc/lispref/files.texi (File Locks):
* doc/misc/tramp.texi (Auto-save File Lock and Backup):
Add remote-file-name-inhibit-locks.
* etc/NEWS: New user option 'remote-file-name-inhibit-locks'.
* lisp/files.el (remote-file-name-inhibit-locks): New defcustom.
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Use `tramp-handle-make-lock-file-name'.
* lisp/net/tramp.el (tramp-allow-unsafe-temporary-files): Fix docstring.
(tramp-handle-make-lock-file-name): New defun.
* test/lisp/net/tramp-tests.el (tramp-test39-lock-file): Extend test.
Mattias Engdegård [Mon, 12 Jul 2021 11:58:28 +0000 (13:58 +0200)]
Block TLS handshake until TCP connection established
If a TLS handshake is attempted before the completion of an
asynchronous TCP connection has been ascertained, our local state will
not be set up correctly for further progress and the sentinel "open"
event will never be sent. This can occur if sufficient time passes
after the initiation of an async TCP connection so that by the time
`wait_reading_process_output` is called, the connection has already
been established on the TCP level.
This somewhat timing-sensitive bug has plagued HTTPS connections on
some platforms, notably macOS, for a long time (bug#49449).
* src/process.c (wait_reading_process_output): Gate the TLS handshake
by the NON_BLOCKING_CONNECT_FD flag. The flag will be cleared as soon
as the TCP socket is found to be writable.
* test/src/process-tests.el (process-async-https-with-delay):
New test.
Ken Brown [Mon, 12 Jul 2021 13:24:12 +0000 (09:24 -0400)]
Fix portability issue with make-serial-process
* src/sysdep.c (struct speed_struct): New struct.
(speeds): New static array of struct speed_struct.
(convert_speed): New static function to convert a numerical baud
rate (e.g., 9600) to a Bnnn constant defined in termios.h (e.g.,
B9600).
(serial_configure): Use convert_speed to make the call to cfsetspeed
compliant with its advertised API. (Bug#49524)
Basil L. Contovounesios [Mon, 12 Jul 2021 14:02:14 +0000 (15:02 +0100)]
; * doc/lispref/intro.texi (Caveats): Fix paren.
Michael Albinus [Mon, 12 Jul 2021 13:49:50 +0000 (15:49 +0200)]
Fix a problem with tramp-*-process-file
* lisp/net/tramp-adb.el (tramp-adb-handle-process-file):
* lisp/net/tramp-sh.el (tramp-sh-handle-process-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-process-file):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
Use `(expand-file-name default-directory)'.
Paul Eggert [Mon, 12 Jul 2021 07:11:22 +0000 (00:11 -0700)]
Port test module to glibc 2.33
* test/Makefile.in (REPLACE_FREE, FREE_SOURCE_0, FREE_SOURCE_1):
New macros.
($(test_module)): Improve accuracy of test as to whether free.c
should be compiled; glibc 2.33 does not need it compiled and the
compilation breaks if you try, if you build with
--enable-gcc-warnings.
Paul Eggert [Mon, 12 Jul 2021 07:07:38 +0000 (00:07 -0700)]
Pacify gcc 11.1.1 -Wclobbered
* src/eval.c (Fprogn, internal_lisp_condition_case):
Add CACHEABLE to work around more instances of -Wclobbered bug.
Paul Eggert [Mon, 12 Jul 2021 07:06:34 +0000 (00:06 -0700)]
Pacify gcc 11.1.1 -Wanalyzer-possible-null-dereference
* oldXMenu/Create.c (XMenuCreate):
* oldXMenu/Internal.c (_XMRecomputePane, _XMRecomputeSelection):
* oldXMenu/XMakeAssoc.c (XMakeAssoc):
* test/src/emacs-module-resources/mod-test.c (Fmod_test_userptr_make):
Don’t assume that malloc and calloc succeed.
Paul Eggert [Mon, 12 Jul 2021 07:00:20 +0000 (00:00 -0700)]
Pacify gcc 11.1.1 -Wanalyzer-null-argument
* lib-src/etags.c (regexp): Omit member force_explicit_name,
since it’s always true. All uses removed. This lets us
remove calls to strlen (name) where GCC isn’t smart enough
to deduce that name must be nonnull.
* lib-src/movemail.c (main): Fix bug that could cause
link (tempname, NULL) to be called.
* src/emacs.c (argmatch): Break check into two ‘if’s,
since GCC doesn’t seem to be smart enough to check the single ‘if’.
* src/gtkutil.c (xg_update_menu_item): Fix bug where strcmp
could be given a NULL arg.
* src/xfont.c (xfont_list_family): Use nonnull value for dummy
initial value.
Paul Eggert [Mon, 12 Jul 2021 06:54:32 +0000 (23:54 -0700)]
Pacify gcc -Woverflow more nicely
* src/alloc.c (mark_maybe_pointer): Simplify pacification
of gcc -Woverflow (unknown GCC version).
Juri Linkov [Sun, 11 Jul 2021 23:45:51 +0000 (02:45 +0300)]
* lisp/textmodes/enriched.el: Require 'facemenu' (bug#49466)
Eric Abrahamsen [Sun, 11 Jul 2021 16:00:33 +0000 (09:00 -0700)]
Further tweaks to gnus-search-query-expand-key
* lisp/gnus/gnus-search.el (gnus-search-query-expand-key): It's
possible that KEY could be partially completed (ie no longer string=
to COMP), but not all the way. Use a more accurate test. Add
docstring.
Michael Albinus [Sun, 11 Jul 2021 15:41:33 +0000 (17:41 +0200)]
Use `auto-save-file-name-p' in tramp-*-write-region
* lisp/net/tramp.el (tramp-handle-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-write-region):
Use `auto-save-file-name-p'.
Eli Zaretskii [Sun, 11 Jul 2021 15:22:51 +0000 (18:22 +0300)]
Fix compilation of the --with-wide-int configuration
* src/alloc.c (mark_maybe_pointer): Fix a recent change for
WIDE_EMACS_INT builds. (Bug#49261)
Basil L. Contovounesios [Sun, 11 Jul 2021 10:55:31 +0000 (11:55 +0100)]
; Fix misspellings of 'occurrence' in docs.
Eli Zaretskii [Sun, 11 Jul 2021 10:15:34 +0000 (13:15 +0300)]
; * doc/lispref/text.texi (Substitution): Fix a recent change.
Paul Eggert [Sun, 11 Jul 2021 08:12:00 +0000 (01:12 -0700)]
Pacify GCC 11.1.1
20210531 (Red Hat 11.1.1-3)
* src/image.c (xpm_load_image):
* src/xfns.c (x_icon):
Rework to pacify gcc -Wmaybe-uninitialized.
Paul Eggert [Sun, 11 Jul 2021 07:54:32 +0000 (00:54 -0700)]
Make pdumper-marking pickier
Prevent some false-positives in conservative GC marking.
This doesn’t fix any correctness bugs; it’s merely to
reclaim some memory instead of keeping it unnecessarily.
* src/alloc.c (mark_maybe_pointer): New arg SYMBOL_ONLY.
All callers changed. Check that the pointer’s tag, if any,
matches the pdumper-reported type.
Paul Eggert [Sun, 11 Jul 2021 07:27:43 +0000 (00:27 -0700)]
Fix pdumper-related GC bug
* src/alloc.c (mark_maybe_pointer): Also mark pointers
to pdumper objects, even when the pointers are tagged.
Add a FIXME saying why this isn’t enough.
Eric Abrahamsen [Sat, 10 Jul 2021 17:00:32 +0000 (10:00 -0700)]
Rewrite gnus-search-query-expand-key
* lisp/gnus/gnus-search.el (gnus-search-query-expand-key): There was a
misunderstanding about how completion-all-completion works (if the
test string can't be completed, the whole table is returned). Simplify
to use try-completion.
* test/lisp/gnus/gnus-search-tests.el (gnus-s-expand-keyword): Ensure
that an unknown/uncompletable keyword is returned unmolested.
Eric Abrahamsen [Sat, 26 Jun 2021 17:16:19 +0000 (10:16 -0700)]
Rework gnus-search-indexed-parse-output
* lisp/gnus/gnus-search.el (gnus-search-indexed-parse-output): Be more
careful about matching filesystem paths to Gnus group names; make
absolutely sure that we only return valid article numbers.
Matthew White [Sat, 10 Jul 2021 22:49:12 +0000 (00:49 +0200)]
* src/buffer.c (kill-buffer): Fix a typo.
* src/buffer.c (Fkill_buffer): Fix typo in comment.
Filipp Gunbin [Sat, 10 Jul 2021 17:00:01 +0000 (19:00 +0200)]
doc/lispref/text.texi (Substitution): Add subst-char-in-string
* doc/lispref/text.texi (Substitution): Document
subst-char-in-string (bug#49420).
Lars Ingebrigtsen [Sat, 10 Jul 2021 16:53:28 +0000 (18:53 +0200)]
Make package-menu-filter-by-status work as documented
* lisp/emacs-lisp/package.el (package-menu-filter-by-status): Work
as documented (bug#49474).
Ken Brown [Fri, 9 Jul 2021 20:37:52 +0000 (16:37 -0400)]
Skip a process test on Cygwin to avoid hang
* test/src/process-tests.el
(process-tests/fd-setsize-no-crash/make-network-process): Skip
test on Cygwin to avoid hang due to connect/accept handshake.
(Bug#49496)
Stefan Monnier [Fri, 9 Jul 2021 19:53:38 +0000 (15:53 -0400)]
* lisp/facemenu.el: Preload the C-mouse-2 menu binding
Michael Albinus [Fri, 9 Jul 2021 16:14:19 +0000 (18:14 +0200)]
Further cleanup for file locks
* doc/misc/tramp.texi (Top, Configuration): Adapt node name for
file locks.
(Auto-save File Lock and Backup): Rename node name and section
title. Add file-lock to @cindex. Describe file locks.
* lisp/dired.el (dired-trivial-filenames): Add lock files.
(dired-font-lock-keywords): Move files suffixed with
`completion-ignored-extensions' up. Add lock files to these checks.
* lisp/net/tramp.el (tramp-get-lock-file, tramp-handle-unlock-file):
Use `when-let'
(tramp-lock-file-info-regexp): Rename from
`tramp-lock-file-contents-regexp'.
(tramp-handle-file-locked-p, tramp-handle-lock-file): Adapt callees.
(tramp-handle-lock-file): Set file modes of lockname.
* src/buffer.c (Frestore_buffer_modified_p):
* src/fileio.c (write_region):
* src/insdel.c (prepare_to_modify_buffer_1): Call Flock_file.
* src/filelock.c (Qmake_lock_file_name): Declare symbol.
(make_lock_file_name): Use it. Don't check Fboundp, it doesn't
work for interned symbols.
(lock_file): Return a Lisp_Object. Don't check create_lockfiles.
Remove MSDOS version of the function.
(Flock_file): Check create_lockfiles.
(Flock_buffer): Call Flock_file.
* src/lisp.h (lock_file): Remove.
* test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo)
(shadow-test09-shadow-copy-files): Let-bind `create-lockfiles'.
* test/lisp/net/tramp-tests.el (create-lockfiles): Don't set it
globally.
(tramp-test39-lock-file): Check also for `set-visited-file-name'.
Eli Zaretskii [Fri, 9 Jul 2021 11:37:49 +0000 (14:37 +0300)]
Partially restore the lost C-mouse-2 drop-down menu
This allows to pop up the Text Properties menu once facemenu is
loaded. It still doesn't allow C-mouse-2 clicks without manually
loading facemenu; FIXME.
* lisp/facemenu.el (global-map) <C-down-mouse-2>: Add back the
removed binding. (Bug#49466)
Stefan Monnier [Fri, 9 Jul 2021 03:00:03 +0000 (23:00 -0400)]
* lisp/outline.el (outline-mode-cycle-map): Don't bind `tab`.
Since it would take precedence over bindings for TAB in higher
precedence maps.
Michael Albinus [Thu, 8 Jul 2021 19:14:28 +0000 (21:14 +0200)]
* doc/lispref/files.texi (Magic File Names): Add make-lock-file-name.
Michael Albinus [Thu, 8 Jul 2021 19:13:40 +0000 (21:13 +0200)]
Code cleanup wrt file locks
* lisp/files.el (make-lock-file-name): Fix docstring.
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add `make-lock-file-name'.
* lisp/net/tramp.el (tramp-file-name-for-operation):
Add `make-lock-file-name'.
(tramp-handle-unlock-file): Call `userlock--handle-unlock-error'
in case of error.
* src/buffer.c (Frestore_buffer_modified_p):
* src/editfns.c (Freplace_buffer_contents):
* src/fileio.c (Finsert_file_contents, write_region): Call Funlock_file.
* src/filelock.c (unlock_file): Rename from unlock_file_body.
Remove the other declarations of unlock_file. Move file name
handler check to ...
(Funlock_file): ... here. Adapt argument numbers. Call
unlock_file wrapped by internal_condition_case.
(Flock_file): Adapt argument numbers.
(unlock_all_files, Funlock_buffer, unlock_buffer): Call Funlock_file.
* src/lisp.h (unlock_file): Remove.
Juri Linkov [Thu, 8 Jul 2021 17:51:15 +0000 (20:51 +0300)]
Don't turn mouse-1 into mouse-2 when clicking on the tab-line (bug#49247)
* lisp/tab-line.el (tab-line-tab-name-format-default): For 'tab-line-tab-map'
add the property 'follow-link' with the value 'ignore'.
pillule [Thu, 8 Jul 2021 17:39:39 +0000 (20:39 +0300)]
Use display-buffer with re-builder (bug#49069)
* lisp/emacs-lisp/re-builder.el (re-builder): Uses 'display-buffer'
with 'display-buffer-in-direction' to display the reb-buffer. This
allow user-customizations and using it on not splitables windows.
Add a dedication to its window so killing this buffer quit the window.
Lars Ingebrigtsen [Thu, 8 Jul 2021 14:33:28 +0000 (16:33 +0200)]
Make desktop-kill more robust
* lisp/desktop.el (desktop-kill): Allow exiting Emacs even if we
can't delete the desktop file (bug#20762).
Lars Ingebrigtsen [Thu, 8 Jul 2021 14:23:29 +0000 (16:23 +0200)]
Allow inhibiting inserting #! in sh-set-shell
* lisp/progmodes/sh-script.el (sh-set-shell): Allow inhibiting
inserting the #! line (bug#20959).
Lars Ingebrigtsen [Thu, 8 Jul 2021 13:46:38 +0000 (15:46 +0200)]
Avoid making backup files in ediff when `make-backup-files' is nil
* lisp/vc/ediff-util.el (ediff-arrange-autosave-in-merge-jobs):
Don't make backup files when `make-backup-files' is nil (bug#21599).
Lars Ingebrigtsen [Thu, 8 Jul 2021 13:25:34 +0000 (15:25 +0200)]
Make ido-mode override ffap-file-finder
* lisp/ffap.el: Autoload so that we can override in ido (bug#21980).
* lisp/ido.el (ido-everywhere): Override ffap-file-finder.
Michael Albinus [Thu, 8 Jul 2021 05:48:40 +0000 (07:48 +0200)]
Some further adaptions wrt Tramp file name locks
* lisp/files.el (files--transform-file-name): Rename from
`auto-save--transform-file-name'. Wrap with `save-match-data'.
(make-auto-save-file-name): Use it.
(make-lock-file-name): Use it. Call file name handler.
* lisp/net/tramp.el (tramp-handle-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
Suppress file lock for temporary file.
* lisp/net/tramp-compat.el (tramp-compat-make-lock-file-name):
New defalias.
* lisp/net/tramp.el (tramp-get-lock-file)
(tramp-handle-lock-file, tramp-handle-unlock-file): Use it.
(tramp-make-lock-name): Remove.
* test/lisp/filenotify-tests.el (file-notify-test03-events-remote):
Tag it :unstable temporarily.
Lars Ingebrigtsen [Thu, 8 Jul 2021 01:23:46 +0000 (03:23 +0200)]
Exclude term-mode from hi-lock global modes
* lisp/hi-lock.el (hi-lock-exclude-modes): Exclude term-mode so
that `C-x' works in terminal buffers (bug#22620).
Lars Ingebrigtsen [Thu, 8 Jul 2021 00:57:46 +0000 (02:57 +0200)]
Fix font-lock of Makefile variables at the start of lines
* lisp/progmodes/make-mode.el (makefile-var-use-regex): Match
variables at the beginning of lines correctly (bug#23266). Change
suggested by Anders Lindgren <andlind@gmail.com>.
N. Jackson [Thu, 8 Jul 2021 00:43:20 +0000 (02:43 +0200)]
Mention what happens with timers when the computer is asleep
* doc/lispref/os.texi (Timers): Explain what happens if the
computer is a asleep when the timer is scheduled (bug#23929).
Lars Ingebrigtsen [Wed, 7 Jul 2021 20:15:42 +0000 (22:15 +0200)]
Make make_lock_file_name more robust
* src/filelock.c (make_lock_file_name): Protect against the
make-lock-file-name not being defined.
(lock_file, unlock_file_body, Ffile_locked_p): Return early if not
defined.
Eli Zaretskii [Wed, 7 Jul 2021 20:10:52 +0000 (23:10 +0300)]
* lisp/faces.el: Fix a typo.
Eli Zaretskii [Wed, 7 Jul 2021 19:53:28 +0000 (22:53 +0300)]
Fix last change
* lisp/faces.el (tty-menu-enabled-face, tty-menu-disabled-face):
Define for monochrome displays.
Lars Ingebrigtsen [Wed, 7 Jul 2021 19:39:00 +0000 (21:39 +0200)]
Add new user option lock-file-name-transforms
* doc/emacs/files.texi (Interlocking): Mention
lock-file-name-transforms.
* doc/lispref/files.texi (File Locks): Document
lock-file-name-transforms.
* doc/misc/efaq.texi (Not writing files to the current directory):
Mention all the three variables needed to not having Emacs writing
files to the current directory in one place.
* lisp/files.el (lock-file-name-transforms): New user option (bug#49261).
(make-auto-save-file-name): Factor out the main logic...
(auto-save--transform-file-name): ... to this new function.
(make-lock-file-name): New function that also calls the
factored-out function.
* src/filelock.c: Remove MAKE_LOCK_NAME and fill_in_lock_file_name.
(make_lock_file_name): New utility function that calls out to Lisp
to heed `lock-file-name-transforms'.
(lock_file): Use it. Also remove likely buggy call to
dostounix_filename.
(unlock_file_body, Ffile_locked_p): Also use make_lock_file_name.
Eli Zaretskii [Wed, 7 Jul 2021 19:36:27 +0000 (22:36 +0300)]
Fix tty menus on monochrome displays
* lisp/faces.el (tty-menu-selected-face): Make sure the selected
menu item stands out even without colors.
Michael Albinus [Wed, 7 Jul 2021 16:36:53 +0000 (18:36 +0200)]
Implement file locks for remote files (Bug#49261)
* doc/lispref/files.texi (Magic File Names): Add file-locked-p,
lock-file and unlock-file.
* etc/NEWS: Tramp supports file locks now.
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-adb-handle-write-region): Handle LOCKNAME.
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-crypt-handle-file-locked-p, tramp-crypt-handle-lock-file)
(tramp-crypt-handle-unlock-file): New defun.
* lisp/net/tramp-fuse.el (tramp-fuse-mounted-p): Simplify.
(tramp-fuse-unmount): New defun.
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-gvfs-maybe-open-connection): Set "lock-pid" connection property.
* lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-rclone-maybe-open-connection): Set "lock-pid" connection property.
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-sh-handle-write-region): Handle LOCKNAME.
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-smb-handle-copy-directory): Use `sleep-for'.
(tramp-smb-handle-write-region): Handle LOCKNAME.
* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-sshfs-handle-write-region): Handle LOCKNAME.
(tramp-sshfs-maybe-open-connection): Set "lock-pid" connection property.
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-sudoedit-maybe-open-connection):
Set "lock-pid" connection property.
* lisp/net/tramp.el (tramp-file-name-for-operation):
Add `file-locked-p', `lock-file' and `unlock-file'.
(tramp-make-lock-name, tramp-get-lock-file, tramp-get-lock-pid)
(tramp-handle-file-locked-p, tramp-handle-lock-file)
(tramp-handle-unlock-file): New defuns.
(tramp-lock-file-contents-regexp): New regexp.
(tramp-handle-write-region): Handle LOCKNAME.
* src/filelock.c (lock_file, unlock_file_body, Ffile_locked_p):
Call handler if exists.
(Flock_file, Funlock_file): New defuns.
(Qlock_file, Qunlock_file, Qfile_locked_p): Declare symbols.
(Slock_file, Sunlock_file): Declare subroutines.
* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test40-make-nearby-temp-file)
(tramp-archive-test43-file-system-info): Rename.
* test/lisp/net/tramp-tests.el (top): Set `create-lockfiles' to nil.
(tramp--test-fuse-p): New defun.
(tramp-test14-delete-directory): Use it.
(tramp-test39-lock-file): New test.
(tramp-test40-make-nearby-temp-file)
(tramp-test41-special-characters)
(tramp-test41-special-characters-with-stat)
(tramp-test41-special-characters-with-perl)
(tramp-test41-special-characters-with-ls, tramp-test42-utf8)
(tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl)
(tramp-test42-utf8-with-ls, tramp-test43-file-system-info)
(tramp-test44-asynchronous-requests, tramp-test45-auto-load)
(tramp-test45-delay-load, tramp-test45-recursive-load)
(tramp-test45-remote-load-path, tramp-test46-unload): Rename.
(tramp--test-special-characters, tramp--test-utf8)
(tramp--test-asynchronous-requests-timeout): Modify docstring.
Glenn Morris [Wed, 7 Jul 2021 15:04:03 +0000 (08:04 -0700)]
Merge from origin/emacs-27
fbf1cb2bf2 (origin/emacs-27) Fix overfull hbox in Emacs manual
fda60094a2 Minor copyedits of Emacs manual
# Conflicts:
# doc/emacs/display.texi
Lars Ingebrigtsen [Tue, 6 Jul 2021 20:01:55 +0000 (22:01 +0200)]
Make previous empty-body warning disabling more robust
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all):
`byte-compile-warning-enabled-p' may not be defined here.
Basil L. Contovounesios [Tue, 6 Jul 2021 00:05:41 +0000 (01:05 +0100)]
Avoid invalid regexp in wide docstring check
* lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p):
Avoid constructing an invalid regexp during byte-compilation by
limiting the number of columns to the current RE_DUP_MAX of 65535.
This protects against pathological values of fill-column, for
example (bug#49426).
Juri Linkov [Tue, 6 Jul 2021 17:53:09 +0000 (20:53 +0300)]
* lisp/repeat.el (describe-repeat-maps): Rename from `describe-repeat'.
Fix text strings (bug#49265).
Lars Ingebrigtsen [Tue, 6 Jul 2021 17:25:41 +0000 (19:25 +0200)]
Make `M-x clipboard-yank' work reliably
* lisp/menu-bar.el (clipboard-yank): Make the command work
consistently (bug#27442).
* lisp/select.el (gui-selection-value): Try to explain why the
logic is the way it is.
Lars Ingebrigtsen [Tue, 6 Jul 2021 17:13:45 +0000 (19:13 +0200)]
Explain what ( . c) means to the Emacs Lisp reader
* doc/lispref/objects.texi (Dotted Pair Notation): Explain what
( . c) means to the Lisp reader (bug#24875).
Eli Zaretskii [Tue, 6 Jul 2021 17:11:51 +0000 (20:11 +0300)]
Fix right-margin display on TTY frames
* src/dispnew.c (prepare_desired_row, adjust_glyph_matrix): Adjust
the glyph pointer of the right-margin area for all windows but the
rightmost ones on TTY frames, to account for the border glyph.
(Bug#48257)
Lars Ingebrigtsen [Tue, 6 Jul 2021 16:56:51 +0000 (18:56 +0200)]
Warn when wrapping index matches with `,' after `i' in Info
* lisp/info.el (Info--current-index-alternative): New internal
variable.
(Info-warn-on-index-alternatives-wrap): New user option (bug#24282).
(Info-index-next): Use the new user option.
Protesilaos Stavrou [Tue, 6 Jul 2021 07:44:46 +0000 (10:44 +0300)]
Add faces for shr heading elements (bug#49433)
* etc/NEWS: Document new faces.
* lisp/net/shr.el (shr-h1, shr-h2, shr-h3, shr-h4, shr-h5, shr-h6):
Define new faces.
(shr-tag-h1): Remove inclusion of 'variable-pitch' face. Fix
bug#49433 by applying a new face directly.
(shr-tag-h2, shr-tag-h3, shr-tag-h4, shr-tag-h5, shr-tag-h6): Apply
new faces.
Lars Ingebrigtsen [Tue, 6 Jul 2021 15:04:28 +0000 (17:04 +0200)]
Make gnus-gcc-externalize-attachments work again
* lisp/gnus/gnus-msg.el (gnus-inews-do-gcc): Allow externalizing
parts again by defeating the cache (bug#49436).
Lars Ingebrigtsen [Tue, 6 Jul 2021 14:43:49 +0000 (16:43 +0200)]
Allow inhibiting warnings about unused variables and empty bodies
* lisp/emacs-lisp/cconv.el (cconv--warn-unused-msg): Allow
inhibiting warnings about unbound variables (bug#26486).
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Allow
inhibiting warnings about empty bodies.
Lars Ingebrigtsen [Tue, 6 Jul 2021 14:33:25 +0000 (16:33 +0200)]
Allow using `mm-inline-message' from other mail clients than Gnus
* lisp/gnus/mm-view.el (mm-inline-message-prepare-function): New
variable (bug#49380).
(mm-inline-message): Use it to separate out the Gnus-specific code.
* lisp/gnus/gnus-art.el (gnus-mime-display-single): ... which has
been moved here.
Eli Zaretskii [Tue, 6 Jul 2021 12:25:51 +0000 (15:25 +0300)]
Fix overfull hbox in Emacs manual
* doc/emacs/display.texi (Displaying Boundaries): Fix overfull
hbox.
Eli Zaretskii [Tue, 6 Jul 2021 11:57:19 +0000 (14:57 +0300)]
Minor copyedits of Emacs manual
* doc/emacs/book-spine.texi: Fix the author attribution.
(Bug#49405)
* doc/emacs/back.texi: Update text.
Dmitry Gutov [Mon, 5 Jul 2021 22:55:26 +0000 (01:55 +0300)]
(xref--insert-xrefs): Fix printing of line numbers
* lisp/progmodes/xref.el (xref--insert-xrefs):
Fix printing of line numbers when we have multiple files with
(e.g.) single match on the same line.
Philipp Stephani [Mon, 5 Jul 2021 18:34:36 +0000 (20:34 +0200)]
; * test/lisp/subr-tests.el (subr-tests-add-hook-depth): Fix a typo.
Stephen Leake [Mon, 5 Jul 2021 17:04:56 +0000 (10:04 -0700)]
* lisp/progmodes/bug-reference.el: Refer to info manual node
Lars Ingebrigtsen [Mon, 5 Jul 2021 14:56:07 +0000 (16:56 +0200)]
Support reverting in Customize buffers
* lisp/cus-edit.el (custom--revert-buffer): New function (bug#26871).
(Custom-mode): Set up reversion.
(custom--invocation-options): New variable.
(custom-buffer-create-internal): Set it.
Lars Ingebrigtsen [Mon, 5 Jul 2021 14:30:43 +0000 (16:30 +0200)]
Count zero-length matches in `count-matches' correctly
* lisp/replace.el (how-many): Count zero-length matches correctly
(bug#27359).
Lars Ingebrigtsen [Mon, 5 Jul 2021 13:55:38 +0000 (15:55 +0200)]
Propagate :safe properties when autoloading defcustoms
* lisp/emacs-lisp/autoload.el (make-autoload): Propagate the :safe
property to the loaddefs file (bug#28104).
Lars Ingebrigtsen [Mon, 5 Jul 2021 13:09:45 +0000 (15:09 +0200)]
Make `bookmark--unfontify' more robust
* lisp/bookmark.el (bookmark--unfontify): Don't bug out if there's
no fontification recorded (bug#49341).
Lars Ingebrigtsen [Mon, 5 Jul 2021 12:49:56 +0000 (14:49 +0200)]
`image-save' doc string clarification
* lisp/image.el (image-save): Clarify what's being saved
(bug#49347).
Michael Albinus [Mon, 5 Jul 2021 10:09:28 +0000 (12:09 +0200)]
Don't use LOCKNAME for temp files in Tramp (Bug#49406)
* lisp/net/tramp.el (tramp-handle-write-region):
* lisp/net/tramp-adb.el (tramp-adb-handle-write-region):
* lisp/net/tramp-sh.el (tramp-sh-handle-write-region):
* lisp/net/tramp-smb.el (tramp-smb-handle-write-region):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-write-region):
Don't use LOCKNAME for temp file. (Bug#49406)
* test/lisp/shadowfile-tests.el (password-cache-expiry):
Set `shadow-debug' also on emba.
Martin Rudalics [Mon, 5 Jul 2021 08:53:39 +0000 (10:53 +0200)]
Show hand cursor when dragging frame (Bug#49247)
* src/xdisp.c (note_mode_line_or_margin_highlight): Show hand
cursor when dragging frame with mode, tab or header line.
(syms_of_xdisp): Define Qdrag_with_mode_line,
Qdrag_with_header_line and Qdrag_with_tab_line.
Michael Albinus [Mon, 5 Jul 2021 08:24:31 +0000 (10:24 +0200)]
Fix newly introduced error in tramp-tests.el (Bug#49406)
* test/lisp/net/tramp-tests.el (tramp--test-check-files):
Filter out empty strings. (Bug#49406)
Lars Ingebrigtsen [Sun, 4 Jul 2021 14:23:46 +0000 (16:23 +0200)]
Ignore .dir-locals-2.el files more
* lisp/emacs-lisp/shadow.el (load-path-shadows-find):
* lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Ignore
.dir-locals-2.el, too (bug#23257).
Jim Porter [Sun, 4 Jul 2021 13:32:03 +0000 (15:32 +0200)]
Ensure 'call-process' interprets INFILE as a local path
* src/callproc.c (get_current_directory): Rename from
'encode_current_directory' and add boolean ENCODE flag.
(Fcall_process): Interpret INFILE relative to the working directory
from which PROGRAM is run, not 'default-directory'.
(call_process): Use 'get_current_directory'.
* src/process.c (Fmake_process): Use 'get_current_directory'.
* src/process.h (get_current_directory): Rename decl from
'encode_current_directory'.
* src/sysdep.c (sys_subshell): Use 'get_current_directory' (bug#49283).
Lars Ingebrigtsen [Fri, 2 Jul 2021 15:33:37 +0000 (17:33 +0200)]
Adjust eshell and ps-print to not use emacs-kill-hook
* lisp/ps-print.el (ps-kill-emacs-check):
* lisp/eshell/em-dirs.el (eshell-dirs-initialize)
(eshell-save-some-last-dir): Don't use `emacs-kill-hook' (bug#28943).
* lisp/eshell/em-hist.el (eshell-hist-initialize)
(eshell-save-some-history):
Eli Zaretskii [Sun, 4 Jul 2021 12:04:52 +0000 (15:04 +0300)]
* lisp/url/url-util.el (url-unhex-string): Doc fix.
Eli Zaretskii [Sun, 4 Jul 2021 11:55:42 +0000 (14:55 +0300)]
Avoid deprecation warnings with Texinfo 6.8
* doc/lispref/functions.texi (Function Safety):
* doc/misc/srecode.texi (Parts of SRecode):
* doc/misc/wisent.texi (Wisent Semantic, Wisent Lex):
* doc/misc/pcl-cvs.texi (Editing files):
* doc/misc/bovine.texi (top, Starting Rules)
(Bovine Grammar Rules, How Lexical Tokens Match)
(Optional Lambda Expression):
* doc/emacs/msdos.texi (Windows Keyboard):
* doc/emacs/buffers.texi (Several Buffers):
* doc/emacs/text.texi (Text): Avoid using @inforef, which is
deprecated.
Alan Third [Mon, 28 Jun 2021 18:50:31 +0000 (19:50 +0100)]
Fix crash in GNUstep font coverage check
* src/nsfont.m (ns_charset_covers): Check coverage more accurately and
don't automatically assume the buffer is 8192 bytes long.
Alan Third [Sat, 26 Jun 2021 14:39:19 +0000 (15:39 +0100)]
Remove unused variables
* src/nsterm.m ([EmacsView keyDown:]): Remove ns_fake_keydown as
there's no code that ever sets it to YES.
Alan Third [Tue, 22 Jun 2021 20:46:02 +0000 (21:46 +0100)]
Fix thread memory management under NS
* src/thread.c (run_thread): Allocate an autorelease pool so that any
autoreleased Objective C objects are correctly released.
Amin Bandali [Sun, 4 Jul 2021 05:18:19 +0000 (01:18 -0400)]
Update a few more IRC-related references to point to Libera.Chat
Amin Bandali [Sun, 4 Jul 2021 04:14:47 +0000 (00:14 -0400)]
Merge from origin/emacs-27
348b2aed0c Update IRC-related references to point to Libera.Chat
b0e725e2fe Fix typo in c-macro-expand docstring
# Conflicts:
# doc/misc/erc.texi
# doc/misc/gnus-faq.texi
# doc/misc/rcirc.texi
# etc/NEWS
# lisp/erc/erc-services.el
# lisp/erc/erc.el
# lisp/ldefs-boot.el
# lisp/net/rcirc.el
Amin Bandali [Sun, 4 Jul 2021 04:12:58 +0000 (00:12 -0400)]
; Merge from origin/emacs-27
The following commit was skipped:
d70dc6946a ; Auto-commit of loaddefs files.
Amin Bandali [Sun, 4 Jul 2021 04:12:57 +0000 (00:12 -0400)]
Merge from origin/emacs-27
d898d3c73a ; * doc/emacs/back.texi: Fix a typo.
de52dbd4ad Update doc/emacs/ for a new printing of the Emacs Manual book
Amin Bandali [Sun, 4 Jul 2021 03:39:18 +0000 (23:39 -0400)]
Update IRC-related references to point to Libera.Chat
Per GNU and FSF's announcements [0, 1] of moving official IRC channels
to the Libera.Chat IRC network, as well as several Emacs-related
channels following suit [2], update IRC-related references to reflect
the migration.
[0]: https://lists.gnu.org/archive/html/info-gnu/2021-06/msg00005.html
[1]: https://lists.gnu.org/archive/html/info-gnu/2021-06/msg00007.html
[2]: https://lists.gnu.org/archive/html/info-gnu-emacs/2021-06/msg00000.html
Dmitry Gutov [Sun, 4 Jul 2021 01:38:35 +0000 (04:38 +0300)]
Speed up fido-mode
* lisp/icomplete.el (icomplete-completions): Speed up fido-mode (bug#48841).
Daniel Martín [Sat, 3 Jul 2021 15:59:22 +0000 (17:59 +0200)]
Fix typo in c-macro-expand docstring
* lisp/progmodes/cmacexp.el (c-macro-expand): Fix typo. (Bug#49356)
Christopher League [Sat, 3 Jul 2021 13:46:28 +0000 (10:46 -0300)]
Retain documentation string when customizing theme
* lisp/cus-theme.el (customize-create-theme): When editing an existing
theme, load its doc string into the description widget, instead of
replacing it with a date stamp (Bug#49274).
Lars Ingebrigtsen [Fri, 2 Jul 2021 15:29:10 +0000 (17:29 +0200)]
Don't have desktop-save-mode query on `M-x kill-emacs'
* lisp/desktop.el (noninteractive): Prompting functions should not
be added to `kill-emacs-hook' (bug#28943).
(desktop-kill): Return t so that it can be used from
`kill-emacs-query-functions'.
Michael Albinus [Fri, 2 Jul 2021 12:51:23 +0000 (14:51 +0200)]
Implement another fix for bug#49229
* lisp/minibuffer.el (read-file-name-default): Respect remote files.
(Bug#49229)
* lisp/net/tramp-sh.el (tramp-sh-handle-expand-file-name):
Handle special file names on MS Windows.
* lisp/net/tramp.el (tramp-file-name-handler): Revert patch.
(Bug#49229)
Peter Oliver [Wed, 9 Jun 2021 11:58:39 +0000 (12:58 +0100)]
Hide emacs-mail.desktop, emacsclient-mail.desktop from menus
These are intended for use as mailto: URL handlers, not for launching
directly, so we can reduce clutter by hiding them from a desktop
environment’s menus.
* etc/emacs-mail.desktop, etc/emacsclient-mail.desktop: NoDisplay=true
Peter Oliver [Wed, 9 Jun 2021 11:51:15 +0000 (12:51 +0100)]
Install emacs-mail.desktop and emacsclient-mail.desktop
* Makefile.in (install-etc): Install emacs-mail.desktop and
emacsclient-mail.desktop
Peter Oliver [Wed, 9 Jun 2021 11:44:32 +0000 (12:44 +0100)]
Provide an emacsclient-mail.desktop
We provide both an emacs.desktop and an emacsclient.desktop, so for
consistency let’s do the same with mail.
* etc/emacs-mail.desktop: Extract suggestions for using emacsclient
from comments to create emacsclient-mail.desktop.
* etc/emacsclient-mail.desktop: Send mail using an existing Emacs
rather than starting a new one.
Tino Calancha [Sun, 27 Jun 2021 15:53:30 +0000 (17:53 +0200)]
lisp/auth-source-pass.el: Keep legitimate spaces inside data
Users should be able to store a field as follows:
message: remember: Destroy the image and you will break the enemy
and later, recover the message untouched, i.e.:
"remember: Destroy the image and you will break the enemy"
* lisp/auth-source-pass.el (auth-source-pass--parse-data): Preserve
inner spaces at data.
* test/lisp/auth-source-pass-tests.el
(auth-source-pass-parse-with-colons-in-data): Add test.
Damien Cassou [Sun, 27 Jun 2021 15:51:54 +0000 (17:51 +0200)]
; * lisp/auth-source-pass.el: Remove useless metadata
Damien Cassou [Sun, 27 Jun 2021 15:38:59 +0000 (17:38 +0200)]
; * lisp/auth-source-pass.el: Improve docstrings
Iku Iwasa [Sun, 27 Jun 2021 15:36:00 +0000 (17:36 +0200)]
lisp/auth-source-pass.el: Support multiple hosts in search spec
* lisp/auth-source-pass.el (auth-source-pass-search): Accept a list of
strings for argument HOST.
(auth-source-pass--build-result): Rename argument HOST to HOSTS. Also
return value "host" from entry if it exists.
(auth-source-pass--find-match): Rename argument HOST to HOSTS. Iterate
over each host in HOSTS.
* test/lisp/auth-source-pass-tests.el: Add corresponding tests
Jim Porter [Thu, 1 Jul 2021 11:01:00 +0000 (13:01 +0200)]
Don't pass 'null-device' to 'call-process' in ispell
* lisp/textmodes/ispell.el (ispell-find-hunspell-dictionaries):
Replace 'null-device' with nil (bug#49283). This allows running a
local ispell process when editing a buffer editing a file via Tramp.
Martin Rudalics [Fri, 2 Jul 2021 08:55:42 +0000 (10:55 +0200)]
New frame parameter 'drag-with-tab-line' (Bug#49247)
The new frame parameter 'drag-with-tab-line' allows to move
frames by dragging their topmost windows' tab line with the
mouse thus achieving a behavior similar to that provided by
the 'drag-with-header-line' parameter.
* lisp/mouse.el (mouse-drag-tab-line): New function.
(mouse-drag-frame-resize, mouse-drag-frame-move)
([tab-line down-mouse-1]): Handle tab line dragging in various
keymaps.
* doc/lispref/frames.texi (Mouse Dragging Parameters): Describe
new parameter 'drag-with-tab-line'.
* etc/NEWS: Add entry for 'drag-with-tab-line'.
Michael Albinus [Fri, 2 Jul 2021 08:01:46 +0000 (10:01 +0200)]
Fix a problem of cus-start.el for remote default directories
* lisp/cus-start.el: Bind `default-directory' to "/" when calling
`shell-command-to-string' for a local value on DARWIN.